Class MUNameUpdMessage

All Implemented Interfaces:
LTV

public class MUNameUpdMessage extends MultiUserMessage
This is a name update message from PT.
  • Field Details

  • Constructor Details

    • MUNameUpdMessage

      public MUNameUpdMessage(String name)
      This function creates a name update message for the MU protocol.
      Parameters:
      name - String
    • MUNameUpdMessage

      public MUNameUpdMessage()
  • Method Details

    • setName

      public void setName(String name)
      Sets the updated named.
      Parameters:
      name - The updated named to send
    • getName

      public String getName()
      Gets the name from the update message.
      Returns:
      String The updated name
    • getMessage

      public static MUNameUpdMessage getMessage(EncodedBuffer buffer)
      A deserialization function that creates a new message from a PtmpBuffer object.
      Parameters:
      buffer - The PtmpBuffer to get from
      Returns:
      A new instance of a MUNameUpdMessage class get from the buffer
    • encodeTypeAndPayload

      public void encodeTypeAndPayload(EncodedBuffer buffer)
      Serializes the message into a PtmpBuffer.
      Specified by:
      encodeTypeAndPayload in interface LTV
      Overrides:
      encodeTypeAndPayload in class LTVImpl
      Parameters:
      buffer - The PtmpBuffer to put the message into
    • toString

      public String toString()
      Converts this message into a string for debugging purposes
      Overrides:
      toString in class MultiUserMessage
      Returns:
      A string representation of this message